//
//  OneCell.m
//  WE
//
//  Created by 要帅气的生活 on 15/11/18.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "OneCell.h"
#import "BaseView.h"
#import "Size.h"

@interface OneCell ()

@property (nonatomic,strong) UIImageView *one1;
@property (nonatomic,strong) UIImageView *one2;
@property (nonatomic,strong) UIImageView *one3;
@property (nonatomic,strong) UIImageView *one4;

@end

@implementation OneCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _registered = [[BaseView alloc] init];
        [self.contentView addSubview:_registered];
        //_registered.backgroundColor = [UIColor blueColor];
        _one1 = [[UIImageView alloc] init];
        [_registered addSubview:_one1];
        
        _Theinquiry = [[BaseView alloc] init];
        [self.contentView addSubview:_Theinquiry];
        //_Theinquiry.backgroundColor = [UIColor purpleColor];
        _one2 = [[UIImageView alloc] init];
        [_Theinquiry addSubview:_one2];
        
        _Quickabout = [[BaseView alloc] init];
        [self.contentView addSubview:_Quickabout];
        //_Quickabout.backgroundColor = [UIColor blackColor];
        _one3 = [[UIImageView alloc] init];
        [_Quickabout addSubview:_one3];
        
        _Focuson = [[BaseView alloc] init];
        [self.contentView addSubview:_Focuson];
        //_Focuson.backgroundColor = [UIColor yellowColor];
        _one4 = [[UIImageView alloc] init];
        [_Focuson addSubview:_one4];
    }
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _registered.frame = CGRectMake(0, 0, self.frame.size.width/5*2-1, self.frame.size.height);
    _one1.frame = _registered.bounds;
    _one1.image = [UIImage imageNamed:@"one1.png"];
    
    _Theinquiry.frame = CGRectMake(self.frame.size.width/5*2, 0, self.frame.size.width/5*3, self.frame.size.height/2-1);
    _one2.frame = _Theinquiry.bounds;
    _one2.image = [UIImage imageNamed:@"one2.png"];
    
    _Quickabout.frame = CGRectMake(self.frame.size.width/5*2, self.frame.size.height/2, self.frame.size.width/10*3-1, self.frame.size.height/2);
    _one3.frame = _Quickabout.bounds;
    _one3.image = [UIImage imageNamed:@"one3.png"];
    
    _Focuson.frame = CGRectMake(self.frame.size.width/10*7, self.frame.size.height/2, self.frame.size.width/10*3-1, self.frame.size.height/2);
    _one4.frame = _Focuson.bounds;
    _one4.image = [UIImage imageNamed:@"one4.png"];
    
    [ToolUtil createVerticalLine:0 superView:self.contentView lift:self.frame.size.width/5*2-1 height:self.frame.size.height];
    [ToolUtil createVerticalLine:0 superView:self.contentView lift:self.frame.size.width/5*2-0.5 height:self.frame.size.height];
    [ToolUtil createLine:self.frame.size.height/2-1 superView:self.contentView lift:self.frame.size.width/5*2 width:self.frame.size.width/5*3 hight:1 color:GRAYCOLOR];
    [ToolUtil createVerticalLine:self.frame.size.height/2 superView:self.contentView lift:self.frame.size.width/10*7-1 height:self.frame.size.height/2];
    [ToolUtil createVerticalLine:self.frame.size.height/2 superView:self.contentView lift:self.frame.size.width/10*7-0.5 height:self.frame.size.height/2];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
